import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    //播放界面-歌手信息:人名+歌名
    singerInfo: {
      name: "", //人名
      songname: "", //歌名
      picurl: "", //图片
    },

  },

  mutations: {
    saveInfoList(state, singerInfo) {
      state.singerInfo = singerInfo
    },


  },
  actions: {
    saveSingerActions(context, singerInfo) {
      context.commit('saveInfoList', singerInfo)
    },

  },
})
export default store